#ifndef _KEYWORD_SCHEMA_H_
#define _KEYWORD_SCHEMA_H_

#include "/usr/include/mysql/mysql.h"
#include "schema_manager.h"
#include <list>
using namespace std;




struct keyword_schema_t
{
	bool quit;
	list<table_op_t*> table_ops[KEYWORD_SCHEMA_THREAD_COUNT];
	pthread_mutex_t lockers[KEYWORD_SCHEMA_THREAD_COUNT];
	pthread_cond_t conds[KEYWORD_SCHEMA_THREAD_COUNT];
};

int init_keyword_schema(keyword_schema_t& keyword_schema);
void quit_keyword_schema(keyword_schema_t* keyword_schema);
	
int add_to_keyword_schema(void* keyword);//keyword_t*  
int remove_from_keyword_schema(void* keyword); //keyword_t*

extern keyword_schema_t g_keyword_schema;

#endif

